/*
 *全局参数业务逻辑层
 */
package com.uyayo.portal.biz;

import com.uyayo.ucenter.entity.Member;
import com.uyayo.ucenter.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CheckBiz {

	@Autowired
	private MemberService memberService;

	/**
	 * 检查会员邮箱是否已存在
	 * @return
	 */
	public boolean checkMemberEmailExist(String email){
		Member member = memberService.getMemberByEmail(email);
		return member==null;
	}

	/**
	 * 检查会员是否已存在
	 * @return
	 */
	public boolean checkMemberUsernameExist(String uaername){
		Member member = memberService.getMemberByUsername(uaername);
		return member==null;
	}

}
